home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Yerk 3.64 / Toolbox Classes / Alert next >
Text File  |  1986-09-20  |  717b  |  32 lines

  1. \ alert support
  2. \  1/01/85  cbd Version 1
  3. \  9/05/85  cdn Added disp: method
  4. \  8/22/86  cdn Renumbered alert types to correspond with IM
  5.  
  6. :CLASS Alert  <Super X-Array
  7.  
  8.     Int        resID
  9.     Int        Type    \ 0=stop 1=note, 2=caution
  10.  
  11.     \ ( -- )  display the alert and execute the item
  12.     :M  SHOW: word0  int: resID 0 get: type
  13.         CASE
  14.              0  OF  call StopAlert     ENDOF
  15.             1  OF  call NoteAlert     ENDOF
  16.             2  OF  call CautionAlert  ENDOF
  17.             drop call Alert 0
  18.         ENDCASE
  19.         i->l dup 0>
  20.         IF  1-  exec: super
  21.         ELSE drop
  22.         THEN
  23.     ;M
  24.  
  25.     \ ( resID type -- )  Associates object with it's resource
  26.     :M  INIT:   put: type  put: resid  ;M
  27.  
  28.     \ ( resID type -- )  Combined actions of init: & show:
  29.     :M  DISP:   init: self  show: self ;M
  30.  
  31. ;CLASS
  32.